package agent;

import common.Move;
import java.util.Collections;
import java.util.List;

public class RandomAlgorithm extends GameAlgorithm<AgentCurrentState> {

    /**
     * Chooses randomly from the moves that can be played in the current state.
     * @param currentState
     * @return 
     */    
    @Override
    public Move takeDecision(AgentCurrentState currentState) {
        List<Move> possibleMoves = currentState.getAgentPossibleMoves();
        Collections.shuffle(possibleMoves, random);
        return possibleMoves.get(0);
    }
}
